#include "vectorwise/Operations.hpp"
#include "vectorwise/Primitives.hpp"
#include <functional>

using namespace types;
using namespace std;

namespace vectorwise {
namespace primitives {

#define MK_KEYS_EQUAL(type)                                                    \
   EQCheck keys_equal_##type##_col = (EQCheck)&keys_equal<type, equal_to>;
#define MK_KEYS_NOT_EQUAL(type)                                                \
   NEQCheck keys_not_equal_##type##_col = (NEQCheck)&keys_not_equal<type>;
#define MK_KEYS_NOT_EQUAL_SEL(type)                                            \
   NEQCheckSel keys_not_equal_sel_##type##_col =                               \
       (NEQCheckSel)&keys_not_equal_sel<type>;
#define MK_KEYS_NOT_EQUAL_ROW(type)                                            \
   NEQCheckRow keys_not_equal_row_##type##_col =                               \
       (NEQCheckRow)&keys_not_equal_row<type>;

//EACH_TYPE(NIL, MK_KEYS_EQUAL)
EQCheck keys_equal_Date_col = (EQCheck)&keys_equal<Date, equal_to>;
EQCheck keys_equal_Char_1_col = (EQCheck)&keys_equal<Char_1, equal_to>;
EQCheck keys_equal_Char_6_col = (EQCheck)&keys_equal<Char_6, equal_to>;
EQCheck keys_equal_Char_7_col = (EQCheck)&keys_equal<Char_7, equal_to>;
EQCheck keys_equal_Char_9_col = (EQCheck)&keys_equal<Char_9, equal_to>;
EQCheck keys_equal_Char_10_col = (EQCheck)&keys_equal<Char_10, equal_to>;
EQCheck keys_equal_Char_12_col = (EQCheck)&keys_equal<Char_12, equal_to>;
EQCheck keys_equal_Char_15_col = (EQCheck)&keys_equal<Char_15, equal_to>;
EQCheck keys_equal_Char_25_col = (EQCheck)&keys_equal<Char_25, equal_to>;
EQCheck keys_equal_hash_t_col = (EQCheck)&keys_equal<hash_t, equal_to>;
EQCheck keys_equal_int32_t_col = (EQCheck)&keys_equal<int32_t, equal_to>;
EQCheck keys_equal_int64_t_col = (EQCheck)&keys_equal<int64_t, equal_to>;
EQCheck keys_equal_int8_t_col = (EQCheck)&keys_equal<int8_t, equal_to>;
EQCheck keys_equal_int16_t_col = (EQCheck)&keys_equal<int16_t, equal_to>;

//EACH_TYPE(NIL, MK_KEYS_NOT_EQUAL)
NEQCheck keys_not_equal_Date_col = (NEQCheck)&keys_not_equal<Date>;
NEQCheck keys_not_equal_Char_1_col = (NEQCheck)&keys_not_equal<Char_1>;
NEQCheck keys_not_equal_Char_6_col = (NEQCheck)&keys_not_equal<Char_6>;
NEQCheck keys_not_equal_Char_7_col = (NEQCheck)&keys_not_equal<Char_7>;
NEQCheck keys_not_equal_Char_9_col = (NEQCheck)&keys_not_equal<Char_9>;
NEQCheck keys_not_equal_Char_10_col = (NEQCheck)&keys_not_equal<Char_10>;
NEQCheck keys_not_equal_Char_12_col = (NEQCheck)&keys_not_equal<Char_12>;
NEQCheck keys_not_equal_Char_15_col = (NEQCheck)&keys_not_equal<Char_15>;
NEQCheck keys_not_equal_Char_25_col = (NEQCheck)&keys_not_equal<Char_25>;
NEQCheck keys_not_equal_hash_t_col = (NEQCheck)&keys_not_equal<hash_t>;
NEQCheck keys_not_equal_int32_t_col = (NEQCheck)&keys_not_equal<int32_t>;
NEQCheck keys_not_equal_int64_t_col = (NEQCheck)&keys_not_equal<int64_t>;
NEQCheck keys_not_equal_int8_t_col = (NEQCheck)&keys_not_equal<int8_t>;
NEQCheck keys_not_equal_int16_t_col = (NEQCheck)&keys_not_equal<int16_t>;

//EACH_TYPE(NIL, MK_KEYS_NOT_EQUAL_SEL)
NEQCheckSel keys_not_equal_sel_Date_col =
    (NEQCheckSel)&keys_not_equal_sel<Date>;
NEQCheckSel keys_not_equal_sel_Char_1_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_1>;
NEQCheckSel keys_not_equal_sel_Char_6_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_6>;
NEQCheckSel keys_not_equal_sel_Char_7_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_7>;
NEQCheckSel keys_not_equal_sel_Char_9_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_9>;
NEQCheckSel keys_not_equal_sel_Char_10_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_10>;
NEQCheckSel keys_not_equal_sel_Char_12_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_12>;
NEQCheckSel keys_not_equal_sel_Char_15_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_15>;
NEQCheckSel keys_not_equal_sel_Char_25_col =
    (NEQCheckSel)&keys_not_equal_sel<Char_25>;
NEQCheckSel keys_not_equal_sel_hash_t_col =
    (NEQCheckSel)&keys_not_equal_sel<hash_t>;
NEQCheckSel keys_not_equal_sel_int32_t_col =
    (NEQCheckSel)&keys_not_equal_sel<int32_t>;
NEQCheckSel keys_not_equal_sel_int64_t_col =
    (NEQCheckSel)&keys_not_equal_sel<int64_t>;
NEQCheckSel keys_not_equal_sel_int8_t_col =
    (NEQCheckSel)&keys_not_equal_sel<int8_t>;
NEQCheckSel keys_not_equal_sel_int16_t_col =
    (NEQCheckSel)&keys_not_equal_sel<int16_t>;

//EACH_TYPE(NIL, MK_KEYS_NOT_EQUAL_ROW)
NEQCheckRow keys_not_equal_row_Date_col =
    (NEQCheckRow)&keys_not_equal_row<Date>;
NEQCheckRow keys_not_equal_row_Char_1_col =
    (NEQCheckRow)&keys_not_equal_row<Char_1>;
NEQCheckRow keys_not_equal_row_Char_6_col =
    (NEQCheckRow)&keys_not_equal_row<Char_6>;
NEQCheckRow keys_not_equal_row_Char_7_col =
    (NEQCheckRow)&keys_not_equal_row<Char_7>;
NEQCheckRow keys_not_equal_row_Char_9_col =
    (NEQCheckRow)&keys_not_equal_row<Char_9>;
NEQCheckRow keys_not_equal_row_Char_10_col =
    (NEQCheckRow)&keys_not_equal_row<Char_10>;
NEQCheckRow keys_not_equal_row_Char_12_col =
    (NEQCheckRow)&keys_not_equal_row<Char_12>;
NEQCheckRow keys_not_equal_row_Char_15_col =
    (NEQCheckRow)&keys_not_equal_row<Char_15>;
NEQCheckRow keys_not_equal_row_Char_25_col =
    (NEQCheckRow)&keys_not_equal_row<Char_25>;
NEQCheckRow keys_not_equal_row_hash_t_col =
    (NEQCheckRow)&keys_not_equal_row<hash_t>;
NEQCheckRow keys_not_equal_row_int32_t_col =
    (NEQCheckRow)&keys_not_equal_row<int32_t>;
NEQCheckRow keys_not_equal_row_int64_t_col =
    (NEQCheckRow)&keys_not_equal_row<int64_t>;
NEQCheckRow keys_not_equal_row_int8_t_col =
    (NEQCheckRow)&keys_not_equal_row<int8_t>;
NEQCheckRow keys_not_equal_row_int16_t_col =
    (NEQCheckRow)&keys_not_equal_row<int16_t>;
}
}
